import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/css/reset.css'

Vue.config.productionTip = false

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

import comComponents from './components'
for(let i in comComponents){
  Vue.component(i,comComponents[i])
}

import comFilters from './filters'
for(let i in comFilters){
  Vue.filter(i,comFilters[i])
}

Vue.prototype.$eventBus = new Vue();

if(process.env.NODE_ENV === 'development'){
  Vue.prototype.$pregImg = 'http://localhost:3000';
}else if(process.env.NODE_ENV === 'production'){
  Vue.prototype.$pregImg = '';
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
